<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div>
  <input type="text" v-model="info">
  <!--事件绑定简写-->
  <input type="button" value="按钮"  @click="f()">
  <!--事件绑定-->
  <input type="button" value="按钮"  v-on:click="f()" >
</div>

<script src="https://cdn.staticfile.org/vue/2.2.2/vue.min.js"></script>
<script>
  let v = new Vue({
    el:"body>div",
    data:{
        info:""
    },
    methods:{
      f(){
        alert(v.info);
      }
    }
  })
</script>
</body>
</html>